package cn.diancan.model.types;

public enum MealLocationStatusType {


    FREE(1, "空闲"),

    Reserve(3, "预定"),

    USED(5, "用餐中"),


    ;

    private MealLocationStatusType(Integer type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public static boolean checkExists(Integer type) {
        if (null == type) {
            return false;
        }
        MealLocationStatusType enums[] = MealLocationStatusType.values();
        for (int i = 0; i < enums.length; i++) {
            MealLocationStatusType singleEnum = enums[i];
            if (singleEnum.getType().equals(type)) {
                return true;
            }
        }
        return false;
    }

    private Integer type;
    private String typeName;

    public Integer getType() {
        return type;
    }

    public String getTypeName() {
        return typeName;
    }
}
